import API from "../plugins/request";
import { ResponseData } from '@/interface/request'
export const getshopList = (params:unknown): Promise<ResponseData> => {
  return API.request({
    url: "/shopList",
    method: "get",
    params
  });
};

// 删除商品
export const delshop = (params:unknown): Promise<ResponseData> => {
    return API.request({
      url: `/delshop`,
      method: "get",
      params
    });
  };
//   修改商品
export const editshop = (data:unknown): Promise<ResponseData> => {
    return API.request({
      url: '/editshop',
      method: "post",
      data
    });
  };
  //   添加商品
export const addshop = (data:unknown): Promise<ResponseData> => {
  return API.request({
    url: '/addshop',
    method: "post",
    data
  });
};
// 商品详情
export const getshopdetail = (params:unknown): Promise<ResponseData> => {
  return API.request({
    url: '/shopdetail',
    method: "get",
    params
  });
};
// 加入购物车
export const getshopCar = (data:unknown): Promise<ResponseData> => {
  return API.request({
    url: '/getcarList',
    method: "post",
    data
  });
};
// 购物车列表
export const getshopCarList = (params:unknown): Promise<ResponseData> => {
  return API.request({
    url: '/shopcarListfun',
    method: "get",
    params
  });
};
// 删除购物车商品
export const delshopcar = (params:unknown): Promise<ResponseData> => {
  return API.request({
    url: `/delShopCarItem`,
    method: "get",
    params
  });
};